我打算开始“玩”跨平台项目的基于任务的并行性。我想使用英特尔线程构建模块。我从Windows和VisualStudio开始。由于我目前只想制作原型(prototype),我正在考虑仅在Windows上“玩”,然后有足够的知识在所有兼容平台上使用该库。我了解到,自VS2010以来,Microsoft提供了一个类似的库,即并行处理库,它具有(几乎)与IntelTBB相同的接口(interface)。一些消息来源(包括TBB的团队博客)建议他们一起构建它并且它是同一个库。但它并不是很明确,因为它经常暗示两个库之间存在细微差别。那么,如果有的话,这些区别是什么?我应该直接从最后一个稳定的ITB
TBBtask_arena&task_groupusageforscalingparallel_forwork我正在尝试使用ThreadedBuildingBlockstask_arena。有一个充满"0"的简单数组。Arena的线程将"1"放入数组中的奇数位置。主线程将'2'放在偶数位置的数组中。/*Odd-evenarenastbbtest*/#include#include#include#include#includeusingnamespacestd;constintSIZE=100;intmain(){ tbb::task_arenalimited(1);//nomorethan
TBBtask_arena&task_groupusageforscalingparallel_forwork我正在尝试使用ThreadedBuildingBlockstask_arena。有一个充满"0"的简单数组。Arena的线程将"1"放入数组中的奇数位置。主线程将'2'放在偶数位置的数组中。/*Odd-evenarenastbbtest*/#include#include#include#include#includeusingnamespacestd;constintSIZE=100;intmain(){ tbb::task_arenalimited(1);//nomorethan